package frsf.cidisi.exercise.arqueologo.search;

import frsf.cidisi.faia.agent.Action;
//import frsf.cidisi.faia.agent.Perception;
import frsf.cidisi.faia.environment.Environment;

public class ArqueologoEnvironment extends Environment {

    public ArqueologoEnvironment() {
        // Create the environment state
        this.environmentState = new ArqueologoEnvironmentState();
    }

    public ArqueologoEnvironmentState getEnvironmentState() {
        return (ArqueologoEnvironmentState) super.getEnvironmentState();
    }
    /**
     * This method is called by the simulator. Given the Agent, it creates
     * a new perception reading, for example, the agent position.
     * @param agent
     * @return A perception that will be given to the agent by the simulator.
     */
    @Override
    public  ArqueologoPerception getPercept() {
         ArqueologoPerception perception = new ArqueologoPerception();
//      perception.setVerCofre(this.getVerCofre());
//      perception.setDistanciaMin(this.getDistanciaMin());
        return perception;
    }
    public String toString() {
        return environmentState.toString();
    }
    public boolean agentFailed(Action actionReturned) {
        return false;
    }
    // The following methods are agent-specific:
    public int getVerCofre(){
    	return ((ArqueologoEnvironmentState) this.environmentState).getmundo().getAldea(((ArqueologoEnvironmentState) this.environmentState).getposicionArqueologo()).getPercepcion();
    }
}
